package com.sinotopia.springboot.controller;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import com.sinotopia.springboot.mapper.CustomerMapper;;


@RestController
public class CustomerController {
    
    private final  CustomerMapper customerMapper;
    
	public CustomerController(CustomerMapper customerMapper) {
		this.customerMapper = customerMapper;
	}
    
    @RequestMapping("/customer")
    public String index() {
        //return "Greetings from Spring Boot!";
       return this.customerMapper.findById(1).getFirstName();
    } 
}